package factory_method

type Button interface {
	Click()
}
type CircleButton struct {
}

func (b *CircleButton) Click() {
	println("click circle button")
}

type RectangleButton struct {
}

func (b *RectangleButton) Click() {
	println("click rectangle button")
}

type ButtonFactory interface {
	CreateButton() Button
}
type CircleButtonFactory struct {
}

func (b *CircleButtonFactory) CreateButton() Button {
	return &CircleButton{}
}

type RectangleButtonFactory struct {
}

func (b *RectangleButtonFactory) CreateButton() Button {
	return &RectangleButton{}
}
